const TerserPlugin = require('terser-webpack-plugin')

module.exports = {
  testURL: 'http://localhost:8000',
  testEnvironment: './tests/PuppeteerEnvironment',
  verbose: false,
  globals: {
    ANT_DESIGN_PRO_ONLY_DO_NOT_USE_IN_YOUR_PRODUCTION: false,
    localStorage: null,
  },
  plugins: [
    new webpack.IgnorePlugin(/\.\/locale/, /moment/), // 疏忽moment的语言包打包
  ],
  optimization: {
    
    minimizer: [
        new UglifyjsPlugin({
          // 使用缓存
          cache: true
      }),
      new OptimizeCssPlugin(),
        new TerserPlugin({
            parallel: false
        })
    ],
    noEmitOnErrors: true
}
};
